package global

import (
	"reward-server/config"

	"github.com/ethereum/go-ethereum/ethclient"
	ut "github.com/go-playground/universal-translator"
	"github.com/hdt3213/delayqueue"
	"github.com/redis/go-redis/v9"
	"go.uber.org/zap"
	"gorm.io/gorm"
)

var (
	ServerConfig *config.ServerConfig = &config.ServerConfig{}
	//MySQL数据库
	DB      *gorm.DB
	RedisDB *redis.Client
	Tsrans  ut.Translator
	//AntsPool     *ants.Pool
	PLog   *zap.Logger
	DQueue *delayqueue.DelayQueue
	//KaFuKaClient sarama.SyncProducer
	Ethclient *ethclient.Client
)

const (
	TypeTaskPushDelivery = "push:tickets-del"
)

// // '平台类型：0-Unkonw,1-Android，2-iOS',
var DevicePlatform = map[string]int8{
	"unkonw":  0,
	"android": 1,
	"ios":     2,
}
